<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>
        nums1 = [1,2,3,0,0,0]
            m = 3
        nums2 = [2,5,6]
            n = 3
        var merge = function(nums1, m, nums2, n) {
            let i = 0
            while(i<n){
                nums1[m+i] = nums2[i]
                i++
            }
            nums1.sort()
        };
        merge(nums1,m,nums2,n)
    </script>
</body>
</html>